package com.example.vo.community;

import com.example.dto.business.UserDynamicBusinessDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

/**
 * @author LeXin Huang
 * @date 2021年03月23日 10:36
 */
@ApiModel("用户动态数据")
@Data
@NoArgsConstructor
@ToString
public class UserDynamicRequestVO {
    @ApiModelProperty("动态内容")
    UserDynamicBusinessDTO dynamic;

    @ApiModelProperty("动态内容数组")
    List<UserDynamicBusinessDTO> dynamics;

    Integer nextOffset;

    Integer historyOffset;

    public static UserDynamicRequestVO buildHistoryVO(List<UserDynamicBusinessDTO> dynamics, int nextOffset) {
        UserDynamicRequestVO vo = new UserDynamicRequestVO();
        vo.setDynamics(dynamics);
        vo.setNextOffset(nextOffset);
        return vo;
    }
}
